<include file="Public:header" />

    <table class="table table-bordered table-hover definewidth m10">
        <tr>
            <td width="10%" class="tableleft">登录名</td>
            <td>{$user.name}</td>
        </tr>

        <tr>
            <td class="tableleft">真实姓名</td>
            <td>{$user.nickname}</td>
        </tr>

        <tr>
            <td class="tableleft">性别</td>
            <td>
                <if condition="$user['gender'] eq 1">
                    男
                <else />
                    女
                </if>
            </td>
        </tr>
        <tr>
            <td class="tableleft">出生年月</td>
            <td>
                {$user.borth|date='Y-m-d',###}
            </td>
        </tr>
        <tr>
            <td class="tableleft">角色</td>
            <td>
                {$user.rolename}
            </td>
        </tr>
        <tr>
            <td class="tableleft">状态</td>
            <td>
                <if condition="$user['status'] eq 1">
                    在职
                    <else />
                    离职
                </if>
            </td>
        </tr>
        <tr>
            <td class="tableleft">入职时间</td>
            <td>
                {$user.work_time|date='Y-m-d',###}
            </td>
        </tr>
        <tr>
            <td class="tableleft">状态</td>
            <td>
                <if condition="$user['status'] eq 1">
                    启用
                    <else/>
                    禁用
                </if>
            </td>
        </tr>
        <input type="hidden" value="{$user['reg_time']}" name="reg_time" />
        <tr>
            <td class="tableleft"></td>
            <td>
                <button type="button" class="btn btn-primary" type="button" id="edit-user">修改</button> &nbsp;&nbsp;<button type="button" class="btn btn-success" name="backid" id="backid">返回列表</button>
            </td>
        </tr>
    </table>

<script>
    $(function () {
        $('#backid').click(function(){
            window.location.href="{:U('User/Index')}";
        });
        $('#edit-user').click(function(){
            window.location.href="{:U('User/edit',array('uid'=>$user['user_id']))}";
        });

    });
</script>

<include file="Public:footer" />